<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Koza Project: Панель управления</title>
    <link rel="stylesheet" type="text/css" href="css/login-style.css" />
    <link rel="stylesheet" type="text/css" href="css/login.css" >
    <link href="<?= $this->config->site_url() ?>js/jquery-ui-1.10.3.custom/css/ui-lightness/jquery-ui-1.10.3.custom.min.css" rel="stylesheet">

    <script type="text/javascript" src="/js/jquery-2.0.3.min.js"></script>
    <script type="text/javascript" src="/js/jquery.json-2.4.min.js"></script>
    <script type="text/javascript" src="/js/jquery-ui-1.10.3.custom/js/jquery-ui-1.10.3.custom.min.js"></script>

    <!--[if lte IE 7]><style>.main{display:none;} .support-note .note-ie{display:block;}</style><![endif]-->
</head>
<body>
<div class="container">

    <!-- vladmaxi top bar -->
    <div class="vladmaxi-top">
        &nbsp;&nbsp;&nbsp;Панель управления KOZA Project
        <span class="right">
            <a href="http://koza.mcfr.ua/">
                <strong>Главная странца</strong>
            </a>
        </span>
        <div class="clr"></div>
    </div>
    <!--/ vladmaxi top bar -->

    <header>
        <h1>Панель управления</h1>
        <h2>KOZA Project</h2>
    </header>

    <section class="main">
        <form class="form-1" method="POST" action="<?= $this->config->site_url("actions"); ?>">
            <input type="hidden" name="action" value="login">
            <p class="field">
                <input type="text" name="login" id="login" placeholder="Логин или email">
                <i class="icon-user icon-large"></i>
            </p>
            <p class="field">
                <input type="password" name="password" id="passwd" placeholder="Пароль">
                <i class="icon-lock icon-large"></i>
            </p>
            <p class="submit">
                <button type="submit" name="submit" id="submit"><i class="icon-arrow-right icon-large"></i></button>
            </p>
        </form>
    </section>
</div>
<div id="error-popup" title="Ошибка авторизации">
    <? if ($loginErrorCode != '00'): ?>
        <br/>
        <p style="color: red; text-align: center">
            <? if ($loginErrorCode == "01"): ?>
                Email или пароль введен неверно!
            <? endif; ?>
            <? if ($loginErrorCode == "02"): ?>
                Отказано в доступе!
            <? endif; ?>
        </p>
    <? endif; ?>
</div>
<script type="text/javascript">
    $(function(){
        <? if ($loginErrorCode != '00'): ?>
            $("#error-popup").dialog({
                resizable: false,
                height:190,
                width: 400,
                modal: true,
                show: {
                    effect: "blind",
                    duration: 1000
                },
                hide: {
                    effect: "explode",
                    duration: 1000
                },
                buttons: {
                    "OK": function() { $("#error-popup").dialog("close"); }
                }
            });

            setTimeout(function(){
                $("#error-popup").dialog("close");
            }, 5000);
        <? endif; ?>
    });
</script>
</body>
</html>